import { IELRules, triggerRule } from '@/utils/types';

export class ElRule {
  private readonly _rules: IELRules;
  constructor(rules = []) {
    this._rules = rules;
  }
  get rules(): IELRules {
    return this._rules;
  }
  required(message?: string, trigger: triggerRule = 'blur') {
    this._rules.push({
      message: 'message.verifyMessage.required',
      required: true,
      trigger: trigger,
    });
    return this;
  }
  range(mix: number, max: number, message?: string, trigger: triggerRule = 'blur') {}
}
